package org.jsola.contract.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.contract.constant.ContractType;
import org.jsola.contract.constant.FileType;
import org.jsola.contract.constant.SealType;
import org.jsola.core.dto.BaseDTO;
import org.jsola.core.validator.Const;

import java.util.Date;
import javax.validation.constraints.NotNull;

import static org.jsola.contract.example.ContractExample.E_AGAIN_CONTRACT_ID;
import static org.jsola.contract.example.ContractExample.E_APP_IS_SHOW;
import static org.jsola.contract.example.ContractExample.E_CONTENT;
import static org.jsola.contract.example.ContractExample.E_CONTRACT_NO;
import static org.jsola.contract.example.ContractExample.E_CONTRACT_TYPE;
import static org.jsola.contract.example.ContractExample.E_DATELINE;
import static org.jsola.contract.example.ContractExample.E_EMP_SIGN_DATE;
import static org.jsola.contract.example.ContractExample.E_END_DATE;
import static org.jsola.contract.example.ContractExample.E_FILE_TYPE;
import static org.jsola.contract.example.ContractExample.E_IS_CHECK_FACE;
import static org.jsola.contract.example.ContractExample.E_IS_CHECK_SMS;
import static org.jsola.contract.example.ContractExample.E_IS_VIEW;
import static org.jsola.contract.example.ContractExample.E_NAME;
import static org.jsola.contract.example.ContractExample.E_NEED_INIT_AGAIN;
import static org.jsola.contract.example.ContractExample.E_PARTY_A_ACCOUNT_ID;
import static org.jsola.contract.example.ContractExample.E_PARTY_A_NAME;
import static org.jsola.contract.example.ContractExample.E_PARTY_B_ACCOUNT_ID;
import static org.jsola.contract.example.ContractExample.E_PARTY_B_NAME;
import static org.jsola.contract.example.ContractExample.E_PARTY_B_PHONE;
import static org.jsola.contract.example.ContractExample.E_PRICE;
import static org.jsola.contract.example.ContractExample.E_PUBLISH_DATE;
import static org.jsola.contract.example.ContractExample.E_SEAL_TYPE;
import static org.jsola.contract.example.ContractExample.E_SIGN_DATE;
import static org.jsola.contract.example.ContractExample.E_SIGN_FINISH_DATE;
import static org.jsola.contract.example.ContractExample.E_SUBJECT_ID;
import static org.jsola.contract.example.ContractExample.M_CONTENT_MAX;
import static org.jsola.contract.example.ContractExample.M_CONTRACT_NO_MAX;
import static org.jsola.contract.example.ContractExample.M_CONTRACT_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.ContractExample.M_FILE_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.ContractExample.M_FILE_TYPE_MAX;
import static org.jsola.contract.example.ContractExample.M_NAME_MAX;
import static org.jsola.contract.example.ContractExample.M_NAME_NOT_NULL;
import static org.jsola.contract.example.ContractExample.M_PARTY_A_ACCOUNT_ID_MAX;
import static org.jsola.contract.example.ContractExample.M_PARTY_A_NAME_MAX;
import static org.jsola.contract.example.ContractExample.M_PARTY_B_ACCOUNT_ID_MAX;
import static org.jsola.contract.example.ContractExample.M_PARTY_B_NAME_MAX;
import static org.jsola.contract.example.ContractExample.M_PARTY_B_PHONE_MAX;
import static org.jsola.contract.example.ContractExample.M_SEAL_TYPE_ENUM_NOT_MATCH;
import static org.jsola.contract.example.ContractExample.M_SEAL_TYPE_MAX;
import static org.jsola.contract.example.ContractExample.M_SUBJECT_ID_MAX;
import static org.jsola.contract.example.ContractExample.N_AGAIN_CONTRACT_ID;
import static org.jsola.contract.example.ContractExample.N_APP_IS_SHOW;
import static org.jsola.contract.example.ContractExample.N_CONTENT;
import static org.jsola.contract.example.ContractExample.N_CONTRACT_NO;
import static org.jsola.contract.example.ContractExample.N_CONTRACT_TYPE;
import static org.jsola.contract.example.ContractExample.N_DATELINE;
import static org.jsola.contract.example.ContractExample.N_EMP_SIGN_DATE;
import static org.jsola.contract.example.ContractExample.N_END_DATE;
import static org.jsola.contract.example.ContractExample.N_FILE_TYPE;
import static org.jsola.contract.example.ContractExample.N_IS_CHECK_FACE;
import static org.jsola.contract.example.ContractExample.N_IS_CHECK_SMS;
import static org.jsola.contract.example.ContractExample.N_IS_VIEW;
import static org.jsola.contract.example.ContractExample.N_NAME;
import static org.jsola.contract.example.ContractExample.N_NEED_INIT_AGAIN;
import static org.jsola.contract.example.ContractExample.N_PARTY_A_ACCOUNT_ID;
import static org.jsola.contract.example.ContractExample.N_PARTY_A_NAME;
import static org.jsola.contract.example.ContractExample.N_PARTY_B_ACCOUNT_ID;
import static org.jsola.contract.example.ContractExample.N_PARTY_B_NAME;
import static org.jsola.contract.example.ContractExample.N_PARTY_B_PHONE;
import static org.jsola.contract.example.ContractExample.N_PRICE;
import static org.jsola.contract.example.ContractExample.N_PUBLISH_DATE;
import static org.jsola.contract.example.ContractExample.N_SEAL_TYPE;
import static org.jsola.contract.example.ContractExample.N_SIGN_DATE;
import static org.jsola.contract.example.ContractExample.N_SIGN_FINISH_DATE;
import static org.jsola.contract.example.ContractExample.N_SUBJECT_ID;
import static org.jsola.core.example.BaseExample.E_ID;
import static org.jsola.core.example.BaseExample.M_ID_NOT_NULL;
import static org.jsola.core.example.BaseExample.N_ID;

/**
 * 合同
 *
 * @author JanusMix
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "修改【合同】的参数")
@Data
public class ContractUpdateDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_ID, example = E_ID, required = true)
    @NotNull(message = M_ID_NOT_NULL)
    private Long id;

    @ApiModelProperty(notes = N_CONTRACT_NO, example = E_CONTRACT_NO)
    @Length(max = 255, message = M_CONTRACT_NO_MAX)
    private String contractNo;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID)
    @Length(max = 32, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_NAME, example = E_NAME, required = true)
    @NotNull(message = M_NAME_NOT_NULL)
    @Length(max = 80, message = "名称长度不能超过80")
    private String name;

    @ApiModelProperty(notes = N_SEAL_TYPE, example = E_SEAL_TYPE, allowableValues = SealType.VALUES_STR)
    @Length(max = 255, message = M_SEAL_TYPE_MAX)
    @Const(constClass = SealType.class, message = M_SEAL_TYPE_ENUM_NOT_MATCH)
    private String sealType;

    @ApiModelProperty(notes = N_CONTRACT_TYPE, example = E_CONTRACT_TYPE, allowableValues = ContractType.VALUES_STR)
    @Const(constClass = ContractType.class, message = M_CONTRACT_TYPE_ENUM_NOT_MATCH)
    private Integer contractType;

    @ApiModelProperty(notes = N_PUBLISH_DATE, example = E_PUBLISH_DATE)
    private Date publishDate;

    @ApiModelProperty(notes = N_SIGN_DATE, example = E_SIGN_DATE)
    private Date signDate;

    @ApiModelProperty(notes = N_END_DATE, example = E_END_DATE)
    private Date endDate;

    @ApiModelProperty(notes = N_EMP_SIGN_DATE, example = E_EMP_SIGN_DATE)
    private Date empSignDate;

    @ApiModelProperty(notes = N_SIGN_FINISH_DATE, example = E_SIGN_FINISH_DATE)
    private Date signFinishDate;

    @ApiModelProperty(notes = N_PARTY_A_ACCOUNT_ID, example = E_PARTY_A_ACCOUNT_ID)
    @Length(max = 40, message = M_PARTY_A_ACCOUNT_ID_MAX)
    private String partyAAccountId;

    @ApiModelProperty(notes = N_PARTY_A_NAME, example = E_PARTY_A_NAME)
    @Length(max = 2147483647, message = M_PARTY_A_NAME_MAX)
    private String partyAName;

    @ApiModelProperty(notes = N_PARTY_B_ACCOUNT_ID, example = E_PARTY_B_ACCOUNT_ID)
    @Length(max = 40, message = M_PARTY_B_ACCOUNT_ID_MAX)
    private String partyBAccountId;

    @ApiModelProperty(notes = N_PARTY_B_NAME, example = E_PARTY_B_NAME)
    @Length(max = 2147483647, message = M_PARTY_B_NAME_MAX)
    private String partyBName;

    @ApiModelProperty(notes = N_PARTY_B_PHONE, example = E_PARTY_B_PHONE)
    @Length(max = 50, message = M_PARTY_B_PHONE_MAX)
    private String partyBPhone;

    @ApiModelProperty(notes = N_PRICE, example = E_PRICE)
    private Long price;

    @ApiModelProperty(notes = N_DATELINE, example = E_DATELINE)
    private Integer dateline;

    @ApiModelProperty(notes = N_FILE_TYPE, example = E_FILE_TYPE, allowableValues = FileType.VALUES_STR)
    @Length(max = 50, message = M_FILE_TYPE_MAX)
    @Const(constClass = FileType.class, message = M_FILE_TYPE_ENUM_NOT_MATCH)
    private String fileType;

    @ApiModelProperty(notes = N_CONTENT, example = E_CONTENT)
    @Length(max = 2147483647, message = M_CONTENT_MAX)
    private String content;

    @ApiModelProperty(notes = N_NEED_INIT_AGAIN, example = E_NEED_INIT_AGAIN)
    private Boolean needInitAgain;

    @ApiModelProperty(notes = N_AGAIN_CONTRACT_ID, example = E_AGAIN_CONTRACT_ID)
    private Long againContractId;

    @ApiModelProperty(notes = N_APP_IS_SHOW, example = E_APP_IS_SHOW)
    private Boolean appIsShow;

    @ApiModelProperty(notes = N_IS_CHECK_FACE, example = E_IS_CHECK_FACE)
    private Boolean isCheckFace;
    
    @ApiModelProperty
    private  Integer status;

    @ApiModelProperty(notes = N_IS_CHECK_SMS, example = E_IS_CHECK_SMS)
    private Boolean isCheckSms;

    @ApiModelProperty(notes = N_IS_VIEW, example = E_IS_VIEW)
    private Boolean isView;


}

